<html>
<head><meta charset="utf-8"><title>No rule to make target llvm-tblgen · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html">No rule to make target llvm-tblgen</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203576017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203576017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203576017">(Jul 11 2020 at 02:24)</a>:</h4>
<p>My recently-rebased aarch64-darwin build fails with:</p>
<div class="codehilite"><pre><span></span><code>gmake[2]: *** No rule to make target &#39;/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/llvm/bin/llvm-tblgen&#39;, needed by &#39;lib/IR/AttributesCompatFunc.inc&#39;.  Stop.
gmake[2]: *** No rule to make target &#39;/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/llvm/bin/llvm-tblgen&#39;, needed by &#39;lib/ToolDrivers/llvm-dlltool/Options.inc&#39;.  Stop.
gmake[2]: *** No rule to make target &#39;/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/llvm/bin/llvm-tblgen&#39;, needed by &#39;lib/ToolDrivers/llvm-lib/Options.inc&#39;.  Stop.
gmake[2]: *** No rule to make target &#39;/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/llvm/bin/llvm-tblgen&#39;, needed by &#39;lib/Transforms/InstCombine/InstCombineTables.inc&#39;.  Stop.
gmake[2]: *** No rule to make target &#39;/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/llvm/bin/llvm-tblgen&#39;, needed by &#39;include/llvm/IR/Attributes.inc&#39;.  Stop.
</code></pre></div>


<p>Does this ring a bell for any recent changes?</p>



<a name="203576790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203576790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203576790">(Jul 11 2020 at 02:46)</a>:</h4>
<p>Hmm, my host LLVM directory is empty, but has <code>llvm-finished-building</code> in it</p>



<a name="203576912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203576912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203576912">(Jul 11 2020 at 02:50)</a>:</h4>
<p>Ugh. Maybe I should run the cross-compiling instructions instead of the native compiling instructions. I had <code>--host aarch64...</code> instead of <code>--host x86_64...</code></p>



<a name="203593750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203593750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203593750">(Jul 11 2020 at 12:02)</a>:</h4>
<p>No, my first thing was right. The host will be aarch64 because I am cross-compiling</p>



<a name="203593931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203593931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203593931">(Jul 11 2020 at 12:06)</a>:</h4>
<p>What the. It put llvm into the <strong>install</strong> directory?</p>
<div class="codehilite"><pre><span></span><code>Installing: /tmp/crossed/Users/shep/Projects/rust/silicon/clean2/build/x86_64-apple-darwin/llvm/bin/opt
</code></pre></div>



<a name="203593962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203593962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203593962">(Jul 11 2020 at 12:07)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> that sounds like a reason I shouldn't use a global environment variable like <code>DESTDIR=/tmp/crossed</code> :-)</p>



<a name="203594038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203594038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203594038">(Jul 11 2020 at 12:09)</a>:</h4>
<p>Since we "install" llvm, but it's supposed to install it into the build directory</p>



<a name="203594161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203594161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203594161">(Jul 11 2020 at 12:12)</a>:</h4>
<p>Now, <em>is</em> there a way to specify the Rust installer's output directory separate from the environment variable...</p>



<a name="203618817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203618817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203618817">(Jul 11 2020 at 23:49)</a>:</h4>
<p>wait what</p>



<a name="203618823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203618823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203618823">(Jul 11 2020 at 23:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> this is just a <code>x.py</code> bug</p>



<a name="203618829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203618829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203618829">(Jul 11 2020 at 23:49)</a>:</h4>
<p>are you using <code>x.py install</code> to do the build step as well?</p>



<a name="203618834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203618834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203618834">(Jul 11 2020 at 23:49)</a>:</h4>
<p>for now you should be able to run the build first <em>then</em> install</p>



<a name="203618874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203618874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203618874">(Jul 11 2020 at 23:50)</a>:</h4>
<p>You probably just want to r- <a href="https://github.com/rust-lang/rust/pull/74252#issuecomment-657112896">https://github.com/rust-lang/rust/pull/74252#issuecomment-657112896</a></p>



<a name="203618877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203618877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203618877">(Jul 11 2020 at 23:50)</a>:</h4>
<p>but file an issue about <code>x.py</code> not clearing/replacing the <code>DESTDIR</code> env var when building LLVM</p>



<a name="203618879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203618879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203618879">(Jul 11 2020 at 23:50)</a>:</h4>
<p>I'll leave a review</p>



<a name="203618888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203618888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203618888">(Jul 11 2020 at 23:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> actually how do you set the env var?</p>



<a name="203618892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203618892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203618892">(Jul 11 2020 at 23:51)</a>:</h4>
<p>like, at what scope?</p>



<a name="203618957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203618957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203618957">(Jul 11 2020 at 23:53)</a>:</h4>
<p><a href="https://github.com/shepmaster/rust/blob/silicon/silicon/README.md#cross-compile-the-compiler-for-the-dtk">https://github.com/shepmaster/rust/blob/silicon/silicon/README.md#cross-compile-the-compiler-for-the-dtk</a></p>



<a name="203619008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203619008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203619008">(Jul 11 2020 at 23:54)</a>:</h4>
<p>okay so it is scoped to the install command, you're just not running a separate build command</p>



<a name="203619021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203619021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203619021">(Jul 11 2020 at 23:55)</a>:</h4>
<p>so yeah it should be possible to just clear the env var in the right place. I guess I can go looking for it</p>



<a name="203619089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203619089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203619089">(Jul 11 2020 at 23:57)</a>:</h4>
<p>oh dear it's done through cmake</p>



<a name="203619137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203619137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203619137">(Jul 11 2020 at 23:58)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> try adding <code>cfg.env("DESTDIR", "");</code> here <a href="https://github.com/rust-lang/rust/blob/master/src/bootstrap/native.rs#L340">https://github.com/rust-lang/rust/blob/master/src/bootstrap/native.rs#L340</a></p>



<a name="203619139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203619139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203619139">(Jul 11 2020 at 23:58)</a>:</h4>
<p>and hopefully it doesn't break anything</p>



<a name="203619150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/No%20rule%20to%20make%20target%20llvm-tblgen/near/203619150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/No.20rule.20to.20make.20target.20llvm-tblgen.html#203619150">(Jul 11 2020 at 23:59)</a>:</h4>
<p>sadly no <code>env_clear</code> in the <code>cmake</code> crate <a href="https://docs.rs/cmake/0.1.44/cmake/struct.Config.html#method.env">https://docs.rs/cmake/0.1.44/cmake/struct.Config.html#method.env</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>